import os
import time
import datetime
import json

#URL = 'http://mixgo.org/static/mp/'
URL = 'https://gitee.com/mixlyplus/Mixly/raw/master/'
VER = 'v1.0.0'
id = time.strftime('%Y%m%d%H%M', time.localtime(time.time()))
paths = []
for root, dirs, files in os.walk("mpBuild", topdown=False):
    for name in files:
        paths.append(os.path.join(root, name))

with open('update_mp.json', 'w') as fd:
    jsond = {'id': id, 'url': URL, 'paths': paths, 'ver': VER}
    fd.write(json.dumps(jsond, ensure_ascii=False))
